package com.w1.security.querymodel;

/**
 * 查询参数分页类
 * guzhijia
 * 2022-1-25
 */
public class QueryPageInfo {

    private int pageIndex;
    private int pageSize;

    public QueryPageInfo() {
        this(0, 20);
    }

    public QueryPageInfo(int pageIndex, int pageSize) {
        this.pageIndex = Math.max(pageIndex, 0);
        this.pageSize = pageSize <= 0 ? 20 : pageSize;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        this.pageIndex = Math.max(pageIndex, 0);
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize <= 0 ? 20 : pageSize;
    }

}
